# 元组集合转换
color = ('r','g','b','r','g','h')
new_color = set(color)
print(list(new_color))
# 添加
list = {1,2,3,4,5,5,3,5,7,8,6,7,4}
list.add(9)
print(list)
for num in list:
    if num % 2 == 0:
        continue
    print(f"list 中的奇数有:{num}")

# 定义空集合
# v = set()  # 定义空集合
# v = {}   v = dict{} #定义空字典

s1 = {'小明','小红','小兰','小红','小黑'}
s2 = {'小蓝','小王','小赵','小红'}
# s3 = s1 | s2
# print(s3)
s4 = s1 & s2
print(s4)
s3 = s2-s1
print(s3)
s5 = s1 -s2
print(s5)
print(len(s1))

